# -*- conding:UTF-8 -*-

'''
@ Project: shop
@ File: search_indexes.py
@ Author: 韩成瑾
@ Date：2022/5/11 14:56

'''

from haystack import indexes
from goods.models import Goods
class GoodsIndex(indexes.SearchIndex.indexes.Indexable):
    text = indexes.CharField(document=True,use_template=True)
    def get_model(self):
        return Goods
    def index_queryset(self,using=None):
        return self.get_model().objects.all()